public class GCTest {
	byte array[] = new byte[1024];

	public static void main(String[] args) {
		//TODO: modify numberOfIterations to check that GC is called
		int numberOfIterations = Integer.parseInt(args[0]);
		
		for (int i = 0; i < numberOfIterations; i++) {
			//TODO: collect references to foo at an array to prevent object being garbage collected
			Foo foo = new Foo(i);
		}
		
		Foo[] evilArray = new Foo[numberOfIterations];
		
		for (int i = 0; i < numberOfIterations; i++) {
			evilArray[i] = new Foo(i);
		}
	}
}